function adj_w = adjust_vector(W,pop)
small = floor(pop/3);
medium = 2*small;                                                          
large = pop - 2*small;                                                     
small_w = W(1:small,:);                                                    
% medium_w = W(small+1:medium,:);
% large_w = W(medium+1:pop,:);                                    
del_num = floor(large/2);                                                  
add_num = del_num;
    W(medium+2:2:pop,:) = [];
    C = small_w(1:add_num+1,:);                                            
    B = zeros((2*add_num)+1,2);                                            
    B(1:2:end,:) = C;                                                     
    sub_w = new_weight(B);                                                 
    adj_w = [sub_w;W(add_num+2:end,:)];
    adj_w = sortrows(adj_w);
end



